<?php

class controller_captcha_demo extends controller
{
    
    // 报价验证码
    public function test()
    {
        $captcha = bone::get_lib('captcha');
        $captcha->draw();
        $captcha->add_point(20); // 添加20个干扰点
        $captcha->add_line(2); // 添加2条干扰线
        $captcha->add_border(2, array(255, 0, 0)); // 添加2像素红色边框
        $captcha->output();
        
        $session = bone::get_session();
        $session->set('captcha_test', $captcha->to_string());
    }
}